package com.blog.applet.domain;

import com.blog.applet.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 文章管理对象 blog_articles
 * 
 * @author crocodilePole
 * @date 2025-04-10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BlogArticles extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文章ID */
    private Long id;

    /** 文章标题 */
    private String title;

    /** 文章内容 */
    private String content;

    /** 文章摘要 */
    private String summary;

    /** 状态：例如 0:"draft" 或 1:"published" */
    private String status;

    /** 封面图片URL */
    private String coverImage;

    /** 作者ID，关联用户表 users.id */
    private Long userId;

    /** 分类ID，关联分类表 categories.id */
    private Long categoryId;

    /** 阅读量，默认值为0 */
    private Long views;

    /** 点赞数，默认值为0 */
    private Long likes;

    /** 文章可见性，默认值为"0" */
    private String visibility;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishedTime;

    /** 逻辑删除 */
    @JsonIgnore
    private Integer delFlag;


}
